<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.6.0.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
			// js DOM方式:
			// window.onload = function()
			// {
			// 	var div02 = document.getElementById("div02");
			// 	div02.style.backgroundColor = "red";
			// }
			// jQuery方式
			$(function(){
				console.log("页面加载完成了1");
				$("#div02").css("background-color","red");
			});
			
			// ready函数的简写方式
			$(function(){
				console.log("页面加载完成了2");
			});
		</script>
	</head>
	<body>
		<div id="div01">abc</div>
		<div id="div02">abc</div>
		<div id="div03">abc</div>
		<div id="div04">abc</div>
	</body>
</html>
